import axios from './index';

/**
 * APIs
 */

// 获取 TAL 列表接口
export function getTal(params: ReadParams) {
    return axios<ResType<{ list: Product[]; total: number }>>('/operate/product/list', {
        method: 'get',
        params,
    });
}

/**
 * Types
 */
export type ReadParams = {
    page: number;
    pageSize: number;
    name?: string;
};

export type Product = {
    nameEn: number;
    uuid: string;
    name: string;
    categoryName: string;
    maxNumber: number;
    validationNumber: number;
    accessType?: string;
};
